// SPDX-License-Identifier: MIT
// Copyright (C) 2018-present iced project and contributors

#if ENCODER && OPCODE_INFO && MVEX
using System;
using System.Collections.Generic;
using Iced.Intel;

namespace Iced.UnitTests.Intel {
	static partial class ToEnumConverter {
		public static bool TryMvexTupleTypeLutKind(string value, out MvexTupleTypeLutKind mvexTupleTypeLutKind) => mvexTupleTypeLutKindDict.TryGetValue(value, out mvexTupleTypeLutKind);
		public static MvexTupleTypeLutKind GetMvexTupleTypeLutKind(string value) => TryMvexTupleTypeLutKind(value, out var mvexTupleTypeLutKind) ? mvexTupleTypeLutKind : throw new InvalidOperationException($"Invalid MvexTupleTypeLutKind value: {value}");

		static readonly Dictionary<string, MvexTupleTypeLutKind> mvexTupleTypeLutKindDict =
			// GENERATOR-BEGIN: MvexTupleTypeLutKindHash
			// ⚠️This was generated by GENERATOR!🦹‍♂️
			new Dictionary<string, MvexTupleTypeLutKind>(14, StringComparer.Ordinal) {
				{ "Int32", MvexTupleTypeLutKind.Int32 },
				{ "Int32_Half", MvexTupleTypeLutKind.Int32_Half },
				{ "Int32_4to16", MvexTupleTypeLutKind.Int32_4to16 },
				{ "Int32_1to16_or_elem", MvexTupleTypeLutKind.Int32_1to16_or_elem },
				{ "Int64", MvexTupleTypeLutKind.Int64 },
				{ "Int64_4to8", MvexTupleTypeLutKind.Int64_4to8 },
				{ "Int64_1to8_or_elem", MvexTupleTypeLutKind.Int64_1to8_or_elem },
				{ "Float32", MvexTupleTypeLutKind.Float32 },
				{ "Float32_Half", MvexTupleTypeLutKind.Float32_Half },
				{ "Float32_4to16", MvexTupleTypeLutKind.Float32_4to16 },
				{ "Float32_1to16_or_elem", MvexTupleTypeLutKind.Float32_1to16_or_elem },
				{ "Float64", MvexTupleTypeLutKind.Float64 },
				{ "Float64_4to8", MvexTupleTypeLutKind.Float64_4to8 },
				{ "Float64_1to8_or_elem", MvexTupleTypeLutKind.Float64_1to8_or_elem },
			};
			// GENERATOR-END: MvexTupleTypeLutKindHash
	}
}
#endif
